package com.useful.excel.listener;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.HashMap;
import java.util.Map;

/**
 * @author : wenchao.long
 * @date : Created in 2021/10/12 17:18 周二
 * @description :
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class HeadDataListener<T> extends AnalysisEventListener<T> {

    private Map<Integer, String> headMap = new HashMap<>();

    @Override
    public void invoke(T t, AnalysisContext analysisContext) {
    }

    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        this.headMap = headMap;
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
    }
}
